import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  public items = [];

  constructor(public navCtrl: NavController, public http:HttpClient) {
    this.getHttpData(0);
  }

  public getHttpData(p:number){
    //this.http.get("http://127.0.0.1:8001/test.data").subscribe(data=>{
    this.http.get("manifest.json").subscribe(data=>{
      //console.log('http ok', data);
      this.items.push({id:this.items.length+1,imgUrl:"assets/imgs/advance-card-bttf.png",up:10,cm:5})
    }, error=>{
      //console.log('http error', error);
    });
  }
}
